<div>
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>工单详情</h5>
                    <div class="ibox-tools" style="top:10px;">
                        <button type="button" class="btn btn-primary btn-sm" v-on:click="_printRepairDetail()">打印
                        </button>
                        <button type="button" class="btn btn-primary btn-sm" v-on:click="_goBack()">返回</button>
                    </div>
                </div>
                <div class="ibox-content">
                    <div>
                        <div>
                            <div class="row">
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label class="col-form-label">工单编码：</label>
                                        <label class="">{{ownerRepairDetailInfo.repairId}}</label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label class="col-form-label">报修类型：</label>
                                        <label class="">{{ownerRepairDetailInfo.repairTypeName}}</label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label class="col-form-label">报修人：</label>
                                        <label class="">{{ownerRepairDetailInfo.repairName}}</label>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label class="col-form-label">联系方式：</label>
                                        <label class="">{{ownerRepairDetailInfo.tel}}</label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label class="col-form-label">位置：</label>
                                        <label class="">{{ownerRepairDetailInfo.repairObjName}}</label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label class="col-form-label">预约时间：</label>
                                        <label class="">{{ownerRepairDetailInfo.appointmentTime}}</label>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label class="col-form-label">状态：</label>
                                        <label class="">{{ownerRepairDetailInfo.stateName}}</label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label class="col-form-label">报修内容：</label>
                                        <label class="">{{ownerRepairDetailInfo.context}}</label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label class="col-form-label"
                                               v-if="ownerRepairDetailInfo.maintenanceType != null && ownerRepairDetailInfo.maintenanceType != ''">维修类型:</label>
                                        <label class=""
                                               v-if="ownerRepairDetailInfo.maintenanceType == '1001'">有偿服务</label>
                                        <label class=""
                                               v-if="ownerRepairDetailInfo.maintenanceType == '1002'">无偿服务</label>
                                        <label class=""
                                               v-if="ownerRepairDetailInfo.maintenanceType == '1003'">需要用料</label>
                                        <label class=""
                                               v-if="ownerRepairDetailInfo.maintenanceType == '1004'">无需用料</label>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-4"
                                     v-if="ownerRepairDetailInfo.maintenanceType == '1001' || ownerRepairDetailInfo.maintenanceType == '1003'">
                                    <div class="form-group">
                                        <label class="col-form-label">用料：</label>
                                        <label class="">{{ownerRepairDetailInfo.repairMaterials}}</label>
                                    </div>
                                </div>
                                <div class="col-sm-4" v-if="ownerRepairDetailInfo.maintenanceType == '1001'">
                                    <div class="form-group">
                                        <label class="col-form-label">费用明细：</label>
                                        <label class="">{{ownerRepairDetailInfo.repairFee}}元 &nbsp;&nbsp;(单价*数量)</label>
                                    </div>
                                </div>
                                <div class="col-sm-4" v-if="ownerRepairDetailInfo.appraiseScore != '0'">
                                    <div class="form-group">
                                        <label class="col-form-label">综合评价得分：</label>
                                        <label class="">{{ownerRepairDetailInfo.appraiseScore}}分</label>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-4" v-if="ownerRepairDetailInfo.doorSpeedScore != '0'">
                                    <div class="form-group">
                                        <label class="col-form-label">上门速度评分：</label>
                                        <label class="">{{ownerRepairDetailInfo.doorSpeedScore}}分</label>
                                    </div>
                                </div>
                                <div class="col-sm-4" v-if="ownerRepairDetailInfo.repairmanServiceScore != '0'">
                                    <div class="form-group">
                                        <label class="col-form-label">维修员服务评分：</label>
                                        <label class="">{{ownerRepairDetailInfo.repairmanServiceScore}}分</label>
                                    </div>
                                </div>
                                <div class="col-sm-4" v-if="ownerRepairDetailInfo.average != '0.0'">
                                    <div class="form-group">
                                        <label class="col-form-label">平均分：</label>
                                        <label class="">{{ownerRepairDetailInfo.average}}分</label>
                                    </div>
                                </div>
                            </div>

                            <div class="row" v-if="ownerRepairDetailInfo.visitType">
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label class="col-form-label">回访满意度：</label>
                                        <label class="">{{ownerRepairDetailInfo.visitType=='1001'?'满意':'不满意'}}</label>
                                    </div>
                                </div>
                                <div class="col-sm-8">
                                    <div class="form-group">
                                        <label class="col-form-label">回访内容：</label>
                                        <label class="">{{ownerRepairDetailInfo.visitContext}}</label>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row" v-if="ownerRepairDetailInfo.repairPhotos.length >0">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>工单图片</h5>
                    <div class="ibox-tools" style="top:10px;">
                    </div>
                </div>
                <div class="ibox-content">
                    <div>
                        <div class="row">
                            <div class="form-group margin-left"
                                 v-for="(item,index) in ownerRepairDetailInfo.repairPhotos">
                                <img style="width: 120px; height: 120px;" v-bind:src="item.url"
                                     v-on:click="openFile(item)"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row" v-if="ownerRepairDetailInfo.beforePhotos.length >0">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>维修前图片</h5>
                    <div class="ibox-tools" style="top:10px;">
                    </div>
                </div>
                <div class="ibox-content">
                    <div>
                        <div class="row">
                            <div class="form-group margin-left"
                                 v-for="(item,index) in ownerRepairDetailInfo.beforePhotos">
                                <img style="width: 120px; height: 120px;" v-bind:src="item.url"
                                     v-on:click="openFile(item)"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row" v-if="ownerRepairDetailInfo.afterPhotos.length >0">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>维修后图片</h5>
                    <div class="ibox-tools" style="top:10px;">
                    </div>
                </div>
                <div class="ibox-content">
                    <div>
                        <div class="row">
                            <div class="form-group margin-left"
                                 v-for="(item,index) in ownerRepairDetailInfo.afterPhotos">
                                <img style="width: 120px; height: 120px;" v-bind:src="item.url"
                                     v-on:click="openFile(item)"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row"
         v-if="ownerRepairDetailInfo.maintenanceType == '1001' || ownerRepairDetailInfo.maintenanceType == '1003'">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>相关物品</h5>
                    <div class="ibox-tools" style="top:10px;">
                    </div>
                </div>
                <div class="ibox-content">
                    <table class="table table-stripped">
                        <thead>
                        <tr>
                            <th scope="col" class="text-center">物品资源编号</th>
                            <th scope="col" class="text-center">物品资源类型</th>
                            <th scope="col" class="text-center">物品资源名称</th>
                            <th scope="col" class="text-center">物品资源规格</th>
                            <th scope="col" class="text-center">物品使用数量</th>
                            <th scope="col" class="text-center">物品价格</th>
                            <th scope="col" class="text-center">使用人</th>
                            <th scope="col" class="text-center">时间</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr v-for="(item,index) in ownerRepairDetailInfo.resourceStoreInfo">
                            <td scope="row" class="text-center">{{item.resId}}</td>
                            <td class="text-center">{{item.parentRstName}} > {{item.rstName}}</td>
                            <td class="text-center">{{item.resourceStoreName}}</td>
                            <td class="text-center">{{item.specName? item.specName : '-'}}</td>
                            <td class="text-center">{{item.quantity}}{{item.miniUnitCodeName}}</td>
                            <td class="text-center">{{item.unitPrice? item.unitPrice : '-'}}</td>
                            <td class="text-center">{{item.createUserName}}</td>
                            <td class="text-center">{{item.createTime}}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>工单流转</h5>
                    <div class="ibox-tools" style="top:10px;">
                    </div>
                </div>
                <div class="ibox-content">
                    <table class="table table-stripped">
                        <thead>
                        <tr>
                            <th scope="col" class="text-center">序号</th>
                            <th scope="col" class="text-center">处理人</th>
                            <th scope="col" class="text-center">状态</th>
                            <th scope="col" class="text-center">处理开始时间</th>
                            <th scope="col" class="text-center">处理结束时间</th>
                            <th scope="col" class="text-center">耗时</th>
                            <th scope="col" class="text-center">意见</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr v-for="(item,index) in ownerRepairDetailInfo.repairUsers">
                            <td scope="row" class="text-center">{{index+1}}</td>
                            <td class="text-center">{{item.staffName}}</td>
                            <td class="text-center" v-if="item.state == '10009' || item.state == '12000'">
                                {{item.stateName}}({{item.payTypeName}})
                            </td>
                            <td class="text-center" v-else>{{item.stateName}}</td>
                            <td class="text-center">{{item.startTime}}</td>
                            <td class="text-center">{{item.endTime}}</td>
                            <td class="text-center">{{item.duration}}</td>
                            <td class="text-center">{{item.context}}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <vc:create path="common/viewImage"></vc:create>
</div>